package com.skpro.mbtis.controller.admin;

import com.skpro.mbtis.entity.Bgm;
import com.skpro.mbtis.service.IBgmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/admin/mbtis/bgm")
public class BgmAdminController {

    @Autowired
    private IBgmService bgmService;

    //REST ful API ，查询全部的老师
    @GetMapping
    public List<Bgm> list(){
        return bgmService.list(null);
    }

    @DeleteMapping("{id}")
    public boolean removeID(@PathVariable String id){
        return bgmService.removeById(id);
    }

}
